﻿using System.ComponentModel.DataAnnotations;

namespace XCI.Core
{
    /// <summary>
    /// 应用配置
    /// </summary>
    public class AppSetting
    {
        /// <summary>
        /// 应用标识
        /// </summary>
        [Required(ErrorMessage = "请输入应用标识")]
        public string Id { get; set; } = "000000";

        /// <summary>
        /// 应用名称
        /// </summary>
        [Required(ErrorMessage = "请输入应用名称")]
        public string Name { get; set; } = "西交投业务管理系统";

        /// <summary>
        /// 是否调试模式
        /// </summary>
        public bool DebugMode { get; set; } = true;

        /// <summary>
        /// 是否单实例启动
        /// </summary>
        public bool EnableSingleton { get; set; } = true;

        /// <summary>
        /// 是否启用软件更新
        /// </summary>
        public bool EnableUpgrade { get; set; } = false;

        /// <summary>
        /// 是否启用同步日期时间
        /// </summary>
        public bool EnableSyncDateTime { get; set; } = false;

        /// <summary>
        /// 应用服务器
        /// </summary>
        public WebApiConfig Server { get; set; } = new WebApiConfig();

        /// <summary>
        /// 文件服务器
        /// </summary>
        public WebApiConfig FileServer { get; set; }
    }
}